# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=snowball
_pkgname=libstemmer
pkgver=0_git20140929
pkgrel=0
pkgdesc="Snowball rule-based stemming algorithms"
url="http://snowball.tartarus.org"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev perl"
install=""
subpackages="$pkgname-dev"
disturl="dev.alpinelinux.org:/archive/$pkgname/"
snapshot="full"
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$_builddir"
	make CC='gcc -fPIC' || return 1
}

package() {
	cd "$_builddir"
	install -d ${pkgdir}/usr/bin || return 1
	install stemwords ${pkgdir}/usr/bin || return 1
	install -d ${pkgdir}/usr/include || return 1
	install include/libstemmer.h ${pkgdir}/usr/include || return 1
	install -d ${pkgdir}/usr/lib || return 1
	install libstemmer.o ${pkgdir}/usr/lib/libstemmer.a || return 1
}

sha512sums="a8c7426ae9e1fc4397845ace6a8d24b1ff555150f210ece76add92bb6a3092c47305577a265f6aba6fc49d6dd6bc6cb8bb4ce523979f479b176f2ffad0477ac3  snowball-0_git20140929.tar.gz"
